import Vue from 'vue'
import Router from 'vue-router'
// 路由懒加载
const Index = (resolve) => {
  import('@/components/index').then((module) => {
    resolve(module)
  })
}

const Refresh = (resolve) => {
  import('@/components/Refresh').then((module) => {
    resolve(module)
  })
}

const Carousel = (resolve) => {
  import('@/components/Carousel').then((module) => {
    resolve(module)
  })
}


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/refresh',
      name: 'Refresh',
      component: Refresh
    },
    {
      path: '/carousel',
      name: 'Carousel',
      component: Carousel
    }
  ]
})
